package org.test.app;

import org.test.dao.ClientDAO;
import org.test.dao.impl.ClientDAOImpl;

/**
 * Created by IntelliJ IDEA.
 * User: German
 * Date: 18.04.12
 * Time: 20:33
 * To change this template use File | Settings | File Templates.
 */
public class Factory {
    private static ClientDAO clientDAO = null;
    //private static DriverDAO driverDAO = null;
    //private static RouteDAO routeDAO = null;
    private static Factory instance = null;

    public static synchronized Factory getInstance(){
        if (instance == null){
            instance = new Factory();
        }
        return instance;
    }

    public ClientDAO getClientDAO(){
        if (clientDAO == null){
            clientDAO = new ClientDAOImpl();
        }
        return clientDAO;
    }

 }
